﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace G.Net.Oauth
{
    public static class OauthConfiger
    {
        public static string AppKey
        {
            get;
            set;
        }

        public static string AppSecret
        {
            get;
            set;
        }

        public static OAuthAccessToken AccessToken
        {
            get;
            set;
        }

        public static void ValidateAccessToken()
        {
            if (null == OauthConfiger.AccessToken)
                throw new OauthException("Access token not obtained. Make sure retrieved access token is set to OauthConfiger.AccessToken.");
        }
        /// <summary>
        /// Gets or sets the OAuth signature method. Default to "HMAC-SHA1".
        /// </summary>
        private static string oAuthSignatureMethod = "HMAC-SHA1";

        public static string OAuthSignatureMethod
        {
            get { return OauthConfiger.oAuthSignatureMethod; }
            set { OauthConfiger.oAuthSignatureMethod = value; }
        }

        /// <summary>
        /// Gets or sets the OAuth version. Default to "1.0".
        /// </summary>
        private static string oAuthVersion = "1.0";

        public static string OAuthVersion
        {
            get { return OauthConfiger.oAuthVersion; }
            set { OauthConfiger.oAuthVersion = value; }
        }

        ///// <summary>
        ///// Gets or sets the OAuth callback. Default to "oob".
        ///// </summary>
        ///// <remarks>In a web application, consider overrides this field to a desired uri during the RequestToken call.</remarks>
        //public static string oAuthCallback = "oob";
    }
}
